The invention relates to a method and an apparatus for implementing automatic gain control in a system where an analog signal is converted into a digital signal.
The present invention relates to systems and apparatuses using analog-to-digital converters. Analog-to-digital converters comprise a certain converter-specific dynamic area, which should be fully utilized, if an optimal performance is desired. If the strength of a signal coming into a converter varies much, problems appear with the utilization of the dynamic area of the converter. Too strong signals are cut off and low-power signals do not utilize the capacity of the converter well. For this reason, the signal power at the input of the converter shall be adjusted dynamically. In this connection, power adjustment is generally called Automatic Gain Control AGC.
U.S. Pat. No. 4,851,842 discloses a prior art solution for implementing automatic gain control in connection with an analog-to-digital converter. An analog signal is monitored and adjusted by means of an adjustable preamplifier and a compensation for the automatic gain control is performed to the digital signal at the output of the converter.
U.S. Pat. No. 3,813,609 discloses another prior art solution for implementing automatic gain control in connection with an analog-to-digital converter. On the basis of a digital output signal of the converter, the power level of an analog signal is adjusted at the input of the converter.
U.S. Pat. No. 5,365,233 discloses a further prior art solution for implementing automatic gain control in connection with an analog-to-digital converter. On the basis of the absolute value of a digital output signal of the converter, the power level of an analog signal is adjusted at the input of the converter.
The present invention can preferably be applied to digital telecommunication, in particular. When time slot-based traffic is used for data transmission, it is preferable that the power of a signal received by a receiver remains constant during the whole time slot. This is essential for the operation of a frequency corrector. In known AGC systems applied to GSM systems, for instance, the power is adjusted once during a time slot. Automatic gain control has generally been based on the power of the first bits of time slots. However, because the power of a signal coming from an antenna can vary much during a time slot, the average power is set to be so low in the known systems that even possible peak powers are situated within the dynamic area of an A/D converter. For this reason, the dynamic area of the A/D converter will be very poorly utilized on an average, because the most significant bits are hardly used at all. The resolution of the converter is then bad.
A drawback of the known methods used in digital systems is also that they function poorly in conjunction with connection establishment bursts. Connection establishment bursts, i.e. access bursts, may be located at a random place of a time slot, in which case the automatic gain control cannot work efficiently.
Accordingly, an object of the invention is to implement a method and an apparatus for realizing the method in such a way that the above problems can be solved. This is achieved by the method of the invention for implementing automatic gain control in a system where an analog signal is converted into a digital signal and where automatic gain control of the adjustable signal is performed in an analog manner using a gain control step of predetermined size and where inverse gain control of the digitized signal is performed in such a way that, after the digital adjustment, the power of the signal is the same as before the analog adjustment. In the method of the invention, the maximum energy of the signal is determined during a predetermined measurement period, the determined maximum energy is compared to preset threshold values, and in case if the measured value exceeds the threshold, an automatic gain control of the analog signal is performed and the digital signal is compensated for the gain control.
Another object of the invention is an apparatus for implementing automatic gain control in a system where an analog signal is converted into a digital signal and which system comprises means for performing automatic gain control of the adjustable signal in an analog manner using a gain control step of predetermined size and means for performing inverse gain control of the digitized signal in such a way that, after the digital adjustment, the power of the signal is the same as before the analog adjustment. The apparatus of the invention comprises means for determining the maximum energy of the signal during a predetermined measurement period, means for comparing the determined maximum energy to preset threshold values and means for initiating an automatic gain control of the analog signal and a compensation for the gain control to the digital signal, if the measured value exceeds the threshold.
Preferred embodiments of the invention are set forth in dependent claims.
Several advantages are achieved by the method and apparatus according to the invention. Because, in the solution of the invention, automatic gain control is performed continuously using a measurement period for averaging measurement results, the solution of the invention is capable of reacting to a power changing during a time slot. By means of the solution, the power can be kept constant during a time slot essentially better than before. In a preferred alternative embodiment of the invention, it is possible to alleviate this effect of power level vibration occurring at the control of the power level.